package com.star.domain;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @description  字段解析表实体类
 * @author wanglong
 * @date 2017年5月26日
 */
@Table(name = "conf_field_rule")
@Entity
@Getter
@Setter
@ToString
public class FieldParseRule extends AbstractEntity {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @Column(columnDefinition = "varchar(38)", nullable = false)
    private String regionId;

    @Column(name = "valueType")
    private String valueType;

    @Column(name = "dictionaryId", nullable = false)
    private String dictionaryId;

    @Column(name = "rule", nullable = false)
    private String rule;


    @Column(name = "remark", columnDefinition = "varchar(255)",nullable = false)
    private String remark;

    private String fieldName;

    public FieldParseRule() {
        valueType = "string";
    }

    public FieldParseRule(String fieldName, String rule) {
        this();
        setFieldName(fieldName);
        this.rule = rule;

    }
}
